<!--
 * @Author: fengweicong 75202172+fengweicong@users.noreply.github.com
 * @Date: 2022-02-16 16:53:19
 * @LastEditors: fengweicong 75202172+fengweicong@users.noreply.github.com
 * @LastEditTime: 2022-07-15 16:20:44
 * @FilePath: \B2B\ebuy\src\views\Main\Supplier\supplier\Archives\index.vue
 * @Description: 
 * 
 * Copyright (c) 2022 by fengweicong 75202172+fengweicong@users.noreply.github.com, All Rights Reserved. 
-->
<template>
    <div>
        <el-card class="archives">
            <div slot="header">
                <span class="title">企业档案</span>
            </div>
            <el-form :model="archives" label-width="150px" label-position="left">
                <el-form-item label="名称：">
                    {{archives.supplier_name}}
                </el-form-item>
                <el-form-item class="message" label="联系人：">
                    {{archives.link_man}}
                </el-form-item>
                <el-form-item class="message" label="联系电话：">
                    {{archives.link_phone}}
                </el-form-item>
                <el-form-item class="message" label="所在地区：">
                    {{archives.address}}
                </el-form-item>
                <el-form-item class="message" label="主营类目：">
                    <el-tag v-for="item in archives.mainProducts" :key="item">{{item}}</el-tag>
                </el-form-item>
                <el-form-item class="message" label="店铺介绍：">
                    {{archives.introduction}}
                </el-form-item>
                <el-form-item class="message" label="备注：">
                    {{archives.message}}
                </el-form-item>
            </el-form>
        </el-card>
    </div>
</template>

<script>
export default {
    name:'supplierArchives',
    data() {
        return {
            archives:{}
        }
    },
    props:{
        // archives:Object
    },
    computed: {
        sid() {
            return this.$store.state.supplier.supplier_id
        }
    },
    watch: {
        sid: {
            immediate: true,
            handler: async function(newVal, oldVal) {
                if (newVal) {
                    await this.$API.getOneSupplier(newVal).then(res => {
                        if (res.status == 200) {
                            this.archives = res.data
                        }
                    })
                }
            }
        }
    },
    created() {
        // console.log('s')
    }
}
</script>

<style lang="less" scoped>
.title{
    color: @color-theme;
    font-size: 2rem;
}
.tips{
    color: @color-tips;
}
.archives{
    padding: 20px 45px;
    .el-form{
        margin-left: 1rem;
    }
    .el-tag{
        margin-left: 10px;
    }
    /deep/ .el-form-item__content, 
    /deep/ .el-form-item__label{
        font-size: 1.5rem;
    }
    .message{
        word-break: break-all;
        white-space: normal;
    }
}
</style>